<extend name="Base/common" />
<block name="style">

</block>
<block name="body">
  <div class="wrap">
    <section id="contents" class="tab-content">
      <div class="table-bar">
        

        <h6 class="main_h6">我的应用</h6>
     
       
      <div class="main_apps">
        <ul>
            <volist name="list_data" id="data">
                <li>
                  <div class="img">
                    <a href="{$data.addons_url}"><img src="{$data.app_icon}"/></a>
                      
                    </div>
                  <div class="desc">
                          <p class="name">{$data.title}</p>
                          <p class="intro">{$data.description}</p>
                          <a class="use_btn" href="{:U('setStatus','addonname='.$data['name'].'&status='.$data['status'])}">{$data.action}</a>
                          <i class="access"></i>
                    </div>
                </li>
            </volist>
        </ul>
      </div>
      <div  class="mt_10"><center><a class="btn btn-large" href="http://idouly.com/wenda/?/shop/" target="_blank">获取更多应用</a></center></div>

        <!-- <div class="mp_news_area notices_box">
            
            <div class="title_bar">
                <h3>豆信动态<a href="http://idouly.com/wenda?/explore/category-2" target="_blank" style="float:right">查看更多</a></h3>
            </div>
            <ul class="mp_news_list" id="dynamic">
                                   
            </ul>
            
        </div> -->


        
        


        


      

    </section>
  </div>
</block>
<block name="script"> 
  <script type="text/javascript">
$(function(){
  //ajax 提交启用
  $('.use_btn').click(function(){
    var href = $(this).attr('href');
    var _this =$(this);
    if(href.indexOf("1.html")!=-1){
      //禁用
      $.get(href,function(){
        updateAlert("更新成功!","alert-success");
        _this.attr('href',href.replace("1.html","0.html"));
        _this.text("已停用");
        _this.parents('tr').attr('style','color:#ccc');
        _this.parents('tr').find('.use_status').text("已停用");;
      });
    }else{
        //启用
        $.get(href,function(){
          updateAlert("更新成功!","alert-success");
          _this.attr('href',href.replace("0.html","1.html"));
          _this.text("已启用");
          _this.parents('tr').removeAttr('style');
          _this.parents('tr').find('.use_status').text("已启用");
        });
        }
    setTimeout(function(){
      $('#top-alert').find('.close').click();
      },3000);    
    return false;
    
    });

})
</script> 

</block>
